<%--
  Created by IntelliJ IDEA.
  User: KK
  Date: 2022/11/19
  Time: 16:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<center>
    <button id="add" onclick="addUser()">新增</button>
    <table border="1px">
        <tr>
            <th>No.</th>
            <th>id</th>
            <th>name</th>
            <th>phone</th>
            <th>address</th>
            <th>operator</th>
        </tr>
        <c:forEach var="u" items="${list}" varStatus="no">
            <tr>
                <td>${no.index+1}</td>
                <td>${u.cid}</td>
                <td>${u.name}</td>
                <td>${u.phone}</td>
                <td>${u.address}</td>
                <td>
                    <button>修改</button>
                    <button>删除</button>
                </td>
            </tr>
        </c:forEach>
    </table>
</center>
<script type="text/javascript">
    function addUser() {
        window.location.assign("/register.jsp");
    }
</script>
</body>
</html>
